package com.sunlands.zlcx.usercenter.client;

import com.sunlands.zlcx.usercenter.client.bean.ShareMsgParamVO;
import com.sunlands.zlcx.usercenter.client.bean.UserOnlineVO;
import com.sunlands.zlcx.usercenter.config.OauthFeignConfig;
import com.sunlands.zlcx.usercenter.vo.response.BusinessResult;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author anjl
 */
@SuppressWarnings("unused")
@FeignClient(value = "desk-mate-socket", configuration = OauthFeignConfig.class)
public interface SocketService {
    @PostMapping(value = "/chat/send")
    BusinessResult sendMessage(@RequestBody ShareMsgParamVO msgEntity);

    @ApiOperation(value = "获取用户socket实时状态")
    @GetMapping("/chat/getOnline")
    BusinessResult<List<UserOnlineVO>> getOnline(@ApiParam("用户id") @RequestParam(value = "userId", required = false) Long userId);

}

